package top.pcat.util;

import top.pcat.entity.Message;

public class MesUtils {

    public static Message SendSystemMsg(String serverId, String msg, Long roomId){
        Message message = new Message("521", "Server System", msg);
        message.setRoomName("服务器");
        message.setRoomId(roomId);
        message.setServerId(serverId);
        return message;
    }

    public static Message SendKafkaMsg(String serverId,String msg, long roomId,String name){

        Message message = new Message("1314", roomId, msg, name);
        message.setServerId(serverId);

        return message;
    }

    public static Message SendUserMsg(String senderId, String msg, long roomId,String name){

        Message message = new Message();
        message.setMesContent(msg);
        message.setSenderId(senderId);
        message.setSenderName(name);
        message.setController(0);
        message.setRoomId(roomId);
        return message;
    }

    public static Object SendSystemMsg(String s) {
        Message message = new Message("521", "Server System", s);
        message.setRoomName("系统");
        return message;
    }
}
